<form action="" class="form-horizontal" role="form">
	<div class="form-group">
	    <label class="col-sm-2 control-label">logo</label>
	    <div class="col-sm-2">
	      <input type="text" class="form-control margin-bottom" name="logo" id="pic" placeholder="请输入活动图片，或点击上传" value="{$haggleShop.logo}"> 
	      <span class="btn btn-primary" id="upload-image">上传LOGO</span>
	    </div>
	</div>
	
	<!-- 文本 -->
	<div class="form-group" id="type-text">
		<label class="col-sm-2 control-label">4S店名称</label>
		<div class="col-sm-4">
			<input class="form-control" name="name" value="{$haggleShop.name}">
		</div> 
	</div>
	
	<!-- 文本 -->
	<div class="form-group" id="type-text">
		<label class="col-sm-2 control-label">链接</label>
		<div class="col-sm-4">
			<input class="form-control" name="url" value="{$haggleShop.url}">
		</div> 
	</div>
	
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-8">
			<input type="hidden" name="id" value="{$haggleShop.id}"/>
			<button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/save">保存更改</button>
		</div>
	</div>
</form>

<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js?{:time()}{:rand(0,9999)}"></script>
<script type="text/javascript">
  $("#upload-image").uploadify({
    'multi'            :  true,
    'buttonClass'      :  'margin-bottom',
    'fileSizeLimit'    :   '200kb',
    'buttonText'       :  '上传图片',
    'fileTypeDesc'     :   'Image Files',
    'fileTypeExts'     :   '*.jpg; *.png',
    'swf'              :   '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
    'uploader'         :   '__MODULE__/Upload/uploadOne',
    'onUploadStart'    :  function(){},
    'onUploadSuccess'  : function( data, res ) {
      var url = eval("(" + res + ")").extra.url;
      $("#pic").val( url );  
    }
  });
</script>